#include<iostream>
using namespace std;

template <typename T>
T Max(T a,T b) {
    return a > b ? a : b;
}

template <class T>
T Min(T a,T b) {
    return a > b ? b : a;
}

int main () {
    cout << Max(2,5) << endl;
    cout << Min(2,3) << endl;
    cout << Max<double>(3,5.0) << endl;
    cout << Min<float>(2,5.0) << endl;
    return 0;
}
